#include <iostream>
#include <cstring>
using namespace std;
int main()
{
	char s[1003];
	string s1,s2;
	cin.getline(s,1003);
	getline(cin,s2);
	int len1 = strlen(s)-1;
	int len2 = s2.size()-1;
	int ans = 0;
	for(int i = 0;i+len2<=len1;i++)
	{
		s1=s+i;
		int x=s1.find(s2)+1;
		if(x){
			i+=x-1;
			ans++;
			continue;
		}
		break;
	}
	cout<<ans;
	return 0;
}